# Maintainer: Frederik Schwan <freswa at archlinux dot org>
# Contributor: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=libgovirt
epoch=2
pkgver=0.3.9
pkgrel=1
pkgdesc='GObject-based library to access oVirt REST API'
arch=(loong64 x86_64)
url='https://gitlab.gnome.org/GNOME/libgovirt'
license=(LGPL)
depends=(librest)
makedepends=(gobject-introspection meson)
source=("https://gitlab.gnome.org/GNOME/libgovirt/-/archive/v${pkgver}/libgovirt-v${pkgver}.tar.bz2")
b2sums=('383660540bcde90e4406e086f8acc98af233b83cd8a8d7f3634fa1de4e6cc43ceeae2f476a16a65732c3cf5c302a2f108b9c5b1d67b39b9999d1de48af22da24')

prepare() {
  cd ${pkgname}-v${pkgver}
}
  
build() {
  arch-meson ${pkgname}-v${pkgver} build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "${pkgdir}"
}
